package com.zmj.sy.mom.srv.aps.utils;

import com.google.common.collect.Lists;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class ApsConstant {

    public static final Integer WORK_TIME = 60 * 60 * 24;

//    public static final List<String> NO_STATISTICS_PHASE = Lists.newArrayList("FJ", "KJ", "LL", "PT", "HJ", "WW", "JG", "HG", "YC");

    public static Map<String, List<Integer>> ORDER_TYPE_MAP = new HashMap<>();

    public static Map<String, Integer> FRAME_TYPE = new LinkedHashMap<>();

//    public static Map<String, TypeReference<?>> QMS_PUSH_CLASSTYPE = new HashMap<>();

    public static final String APS_SCHEDULING_LOCK = "mom-srv-aps:order:scheduling-lock";

    //焊接上料配置
    public static final String MES_STATION_DISTRIBUTE = "mes:dynamicDistributeStation:";

    public static final String FEISHU_MSG = "{\"schema\":\"2.0\",\"config\":{\"update_multi\":true,\"style\":{\"text_size\":{\"normal_v2\":{\"default\":\"normal\",\"pc\":\"normal\",\"mobile\":\"heading\"}}}},\"body\":{\"direction\":\"vertical\",\"padding\":\"12px 12px 12px 12px\",\"elements\":[{\"tag\":\"div\",\"text\":{\"tag\":\"plain_text\",\"content\":\"${content}\",\"text_size\":\"normal_v2\",\"text_align\":\"left\",\"text_color\":\"default\"},\"margin\":\"0px 0px 0px 0px\"}]},\"header\":{\"title\":{\"tag\":\"plain_text\",\"content\":\"${title}\"},\"subtitle\":{\"tag\":\"plain_text\",\"content\":\"\"},\"text_tag_list\":[{\"tag\":\"text_tag\",\"text\":{\"tag\":\"plain_text\",\"content\":\"APS\"},\"color\":\"neutral\"}],\"template\":\"green\",\"padding\":\"12px 12px 12px 12px\"}}";

    static {
        ORDER_TYPE_MAP.put("erp", Lists.newArrayList(1, 3, 4));
        ORDER_TYPE_MAP.put("mbd", Lists.newArrayList(2, 5));


        FRAME_TYPE.put("顶梁", 1);
        FRAME_TYPE.put("底座", 2);
        FRAME_TYPE.put("掩护梁", 3);

        FRAME_TYPE.put("掩护梁左侧护板", 11);
        FRAME_TYPE.put("掩护梁右侧护板", 12);
        FRAME_TYPE.put("顶梁左侧护板", 13);
        FRAME_TYPE.put("顶梁右侧护板", 14);

        FRAME_TYPE.put("左前连杆", 21);
        FRAME_TYPE.put("右前连杆", 22);
        FRAME_TYPE.put("左后连杆", 23);
        FRAME_TYPE.put("右后连杆", 24);

//        QMS_PUSH_CLASSTYPE.put("钢板开工", new TypeReference<TaskPlateProcessReqVo>() {});
//        QMS_PUSH_CLASSTYPE.put("钢板报工", new TypeReference<ArrayList<PlatePartReqVo>>() {});
//        QMS_PUSH_CLASSTYPE.put("零件，小组件开工", new TypeReference<TaskPartReqVo>() {});
//        QMS_PUSH_CLASSTYPE.put("大组件开工", new TypeReference<TaskAssemblyReqVo>() {});
    }
}
